<template>
  <el-container>
    <el-header class="flex">
      <div :style="'width:' + (isCollapse?64:200) + 'px'" class="logo">
        <img src="../assets/logoMini.png" style="">
        <span>测试框架</span>
      </div>
      <div class="flex tab">
        <div><i class="el-icon-s-fold"></i></div>
        <div><i class="el-icon-refresh"></i></div>
      </div>
      <div style="flex-grow:1"></div>
      <div class="flex tab">
        <div><i class="el-icon-full-screen"></i></div>
        <div><i class="el-icon-bell"></i></div>
        <div class="flex">
          <div >
            <img src="../assets/logoMini2.png" style="margin-top: 10px;width: 35px;display: block;height: 35px;border-radius: 50px">
          </div>
          <div>集团管理员</div>
          <div><i class="el-icon-arrow-down"></i></div>
        </div>
        <div><i class="el-icon-s-operation"></i></div>
      </div>
    </el-header>
    <el-container>
      <el-aside style="width: inherit">
        <el-menu
            :collapse="isCollapse"
            default-active="2"
            class="el-menu-vertical-demo"
            background-color="#545c64"
            text-color="#fff"
            active-text-color="#ffd04b"
        >
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>导航一</span>
            </template>
            <el-menu-item-group>
              <template slot="title">分组一</template>
              <el-menu-item index="1-1">选项1</el-menu-item>
              <el-menu-item index="1-2">选项2</el-menu-item>
            </el-menu-item-group>
            <el-menu-item-group title="分组2">
              <el-menu-item index="1-3">选项3</el-menu-item>
            </el-menu-item-group>
            <el-submenu index="1-4">
              <template slot="title">选项4</template>
              <el-menu-item index="1-4-1">选项1</el-menu-item>
            </el-submenu>
          </el-submenu>
          <el-menu-item index="2">
            <i class="el-icon-menu"></i>
            <span slot="title">导航二</span>
          </el-menu-item>
          <el-menu-item index="3" disabled>
            <i class="el-icon-document"></i>
            <span slot="title">导航三</span>
          </el-menu-item>
          <el-menu-item index="4">
            <i class="el-icon-setting"></i>
            <span slot="title">导航四</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-container>
        <el-main>

          <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
            <el-radio-button :label="false">展开</el-radio-button>
            <el-radio-button :label="true">收起</el-radio-button>
          </el-radio-group>

        </el-main>
        <el-footer>Footer</el-footer>
      </el-container>
    </el-container>
  </el-container>
</template>

<script>
export default {
  name: "Home",
  data(){
    return {
      isCollapse:false,
      logoWidth:200
    }
  }
}
</script>

<style scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
}
.el-header, .el-footer {
  background-color: #ffffff;
}
.el-aside {
  background-color: #D3DCE6;
}

.el-main {
  background-color: #E9EEF3;
}
.el-container{
  height: 100%;
}
.el-menu{
  height: 100%;
}
.el-header{
  margin: 0;
  padding: 0;
}
.flex{
  display: flex;
  flex-direction: row;
}
.flex>div{
  line-height: 55px;
  height: 100%;
}
.logo{
  background: #545c64;
  transition: width .3s ease-in-out,left .3s ease-in-out;
  line-height: 54px;
  font-size: 16px;
  font-weight: 800;
  color: white;
}
.logo>img{
  width: 35px;height: 35px;display: block;margin-left: 15px;margin-top: 10px;float: left;margin-right: 10px
}
.tab>div{
  margin: 0 10px;
}
</style>